package com.lanou3g.code0409.common;


public class TestChar {
    public static void main(String[] args) {
        char a = 'A';
        System.out.println(a);
        int a1 = 65;
        System.out.println(a1);
        System.out.println("-----------");
        char b = (char) 65;//把65 强制类型转换成char(只有基本数据类型可以转换)
        System.out.println(b);
        int b1 = (int) 'A';
        System.out.println(b1);
        System.out.println("------------");

        char d = 'D';//68
        char e = 'E';//69
        System.out.println(d > e);
        char f = (char) (e + 1);
        System.out.println(f);//F
        for (char c = 'A'; c <= 'Z'; c++) {
            System.out.println(c);
        }

//        for (int i = 65; i < 91; i++) {
//            char c = (char) i;
//            System.out.println(c);
//        }
    }
}
